
Create PROCEDURE [dbo].[sp_ThanhVien_GetThanhVienDangNhap]

	@TenDangNhap nvarchar(50),
	@MatKhau nvarchar(50)

AS

	SELECT	A.id as MaThanhVien , 
			A.Ten_dang_nhap as TenDangNhap ,
			A.Mat_khau as MatKhau,
			C.Ten as TenVaiTro ,
			A.ma_vai_tro as MaVaiTro,
			A.Ngay_cap_nhat_cuoi as Ngay
	from thanhvien a 
	inner join vaitro c on a.Ma_vai_tro = c.ID
	WHERE a.Ten_dang_nhap = @TenDangNhap And a.Mat_Khau = @MatKhau



